<?php
/**
 * Created by PhpStorm.
 * User: davin
 * Date: 14-10-19
 * Time: 下午9:25
 */


class BackSettingService extends ServiceBase {

    public function updateSetting($entry){

        $this->parseInput($entry,'site_url');
        $this->parseInput($entry,'company_name');
        $this->parseInput($entry,'master_email');
        $this->parseInput($entry,'address');
        $this->parseInput($entry,'service_phone');
        $this->parseInput($entry,'mobile');
        $this->parseInput($entry,'app_url');
        $this->parseInput($entry,'app_id');
        $this->parseInput($entry,'app_secret');
        $this->parseInput($entry,'access_token');
        $this->parseInput($entry,'access_token_expires_in');
        $this->parseInput($entry,'integral_scale');
        $this->parseInput($entry,'company_instroductions');

        if(!$entry->save()){
            $this->errors()->merge($entry->errors());
            return false;
        }

        return true;
    }

}

